import request from '@/utils/request'

// 查询部门设置列表
export function listDept (query) {
  return request({
    url: '/platform/dept/list',
    method: 'get',
    params: query
  })
}

// 查询部门设置详细
export function getDept (deptId) {
  return request({
    url: '/platform/dept/' + deptId,
    method: 'get'
  })
}

// 查询部门下拉树结构
export function treeSelect () {
  return request({
    url: '/platform/dept/treeSelect',
    method: 'get'
  })
}

// 新增部门设置
export function addDept (data) {
  return request({
    url: '/platform/dept',
    method: 'post',
    data: data
  })
}

// 修改部门设置
export function updateDept (data) {
  return request({
    url: '/platform/dept',
    method: 'put',
    data: data
  })
}

// 删除部门设置
export function delDept (deptId) {
  return request({
    url: '/platform/dept/' + deptId,
    method: 'delete'
  })
}
